<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>烟台公安出入境</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=0" />
    <meta name="base">
    <style type="text/css">
        *{margin: 0;padding: 0;}
        html{height: 100%;width: 100%;overflow: hidden;}
        body{height: 100%;width:100%;overflow: hidden;background:-webkit-gradient(linear, 0 0, 100% 100%, from(#38f4ff), to(#39a8f2)); }
        #text_container{height: 40%;font-size:4.3vw;color: #064db3; padding: 5% 10% 2%;font-family: '黑体';font-weight: bold;background-image: url("../view/images/bg.png");background-size: 100% 80%;background-repeat: no-repeat;}
        p.common_line{height: 14%}
        p#zoneName{text-align: center;font-size: 6.6vw;height: 18%;vertical-align: center;}
        p#serviceNumber{text-align: center;font-size: 11.3vw; height: 25%;background-image: url("../view/images/ticket_bg.png");background-size: 100% 100%;margin: 0 15%}
        #map_container{height: 35%;text-align: center}
        #button_container{height: 25%}
        p.tips{text-align: center;font-size: 3.5vw;color: #064db3;height: 20%;vertical-align: center;}

        #nextBtn{background-color: #064db3;color: white;height: 32%;width: 56%;margin: 0 20%;border-radius:3rem;text-align: center;vertical-align: center;font-size: 7vw;padding-top: 2vw;}
    </style>
    <script src="../view/js/jquery-3.2.1.min.js"></script>
    <script src="../view/js/layer.js"></script>
    <script>
        /**
        var useragent = navigator.userAgent;
        if (useragent.match(/MicroMessenger/i) != 'MicroMessenger') {
// 这里警告框会阻塞当前页面继续加载
            alert('已禁访问：您必须使用微信内置浏览器访问本页面！');
// 以下代码是用javascript强行关闭当前页面
            var opened = window.open('about:blank', '_self');
            opened.opener = null;
            opened.close();
        }
*/
        var currentNumber = '#(queue.QUEUE_NUMBER)';
        var loading = false;
        function getNextNumber() {
            if(loading)
            {
                return;
            }
            loading =true;
            $.post({
                url:'../crj/gnn',
                data:{
                    cn:currentNumber
                },
                success:nextNumberCallback
            });
        }
        function nextNumberCallback(response) {

            var result = response.result;
            if(result=="OK")
            {
                var newNumber = response.nn;
                var dayId = response.di;
                location.href = "../crj/pn?no="+newNumber+"&d="+dayId;
            }
            else {
                var msg = response.msg;
                layer.open({
                    content: msg
                    ,skin: 'msg'
                    ,time: 2
                });

            }
            loading =false;
        }

    </script>
</head>
<body>

    <div id="text_container" >
        <p class="common_line">业务名称: #(serviceTypeName)</p>
        <p class="common_line">取号时间: #(timeString)</p>
        <p class="common_line">等候人数: #(queue.WAIT_PERSON)人</p>
        <p class="common_line">请在以下区域等待叫号:</p>
        <p id="zoneName">自助照相区</p>
        <p id="serviceNumber">#(queue.QUEUE_NUMBER)</p>

    </div>
    <div id="map_container">
        <img src="../view/images/map.png" width="96%" />
    </div>
    <div id="button_container" style="display: #(button_display);">
        <p class="tips">* #(tips)请点击下方按钮获取业务号码。</p>
        <div id="nextBtn" onclick="getNextNumber();">获取业务号码</div>
    </div>
</body>
</html>